package com.Arsanesia.TempleRush.Models;

import com.Arsanesia.TempleRush.Controllers.MusicManager;
import com.Arsanesia.TempleRush.Controllers.SoundManager;
import com.Arsanesia.TempleRush.Enumeration.TempleRushSound;
import com.badlogic.gdx.Gdx;

public final class GameConfiguration {
	public static int VIBRATION_DURATION = 300;
	private static boolean VIBRATION = true;
	private static boolean TUTORIAL = true;
	private static boolean ORBMODE = true;
	private static boolean ORBMODE_AVAIL = false;
	public static MusicManager musicmanager = new MusicManager();
	public static SoundManager soundmanager = new SoundManager();
	
	public static void Vibrate(){
		if(VIBRATION) Gdx.input.vibrate(VIBRATION_DURATION);
	}
	public static void toggleVibrate(){
		VIBRATION = !VIBRATION;
	}
	public static void toggleTutorial(){
		TUTORIAL = !TUTORIAL;
	}
	public static void toggleSound(){
		musicmanager.toggleEnable();
		soundmanager.toggleEnable();
	} 
	public static void toggleOrbMode(){
		ORBMODE = !ORBMODE;
	}
	public static void toggleOrbModeAvailability(){
		ORBMODE_AVAIL = !ORBMODE_AVAIL;
	}
	public static void playSoundEffect(TempleRushSound sound){
		soundmanager.play(sound);
	}

	public static boolean isVibrate(){
		return VIBRATION;
	}
	public static boolean isTutorial(){
		return TUTORIAL;
	}
	public static boolean isSoundEnabled(){
		return musicmanager.isEnabled() && soundmanager.isEnabled();
	}
	public static boolean isOrbModeAvailable(){
		return ORBMODE_AVAIL;
	}
	public static boolean isOrbMode(){
		return ORBMODE;
	}
}
